import { param } from "change-case";

export const areaColumn = [
    {
        title: "围栏名称",
        key: "name",
        render(h, params) {
            return h('div', [h('Icon', { props: { type: 'qr-scanner' }, style: { marginRight: '6px' } }), h('span', params.row.name)]);
        }
    },
    {
        title: "所在楼层",
        key: "floor"
    },
    {
        title: "围栏描述",
        key: "desc"
    },
    {
        title: "添加时间",
        key: "update_time"
    },
    {
        title: "操作",
        key: "action",
        width: 102,
        render: (h, params) => {
            return h('div', [
                h('Button', {
                    props: { icon: 'edit', type: 'warning', size: 'small' }, style: { margin: '2px' }, on: {
                        click() {
                            editEnclosure(params.index);
                        }
                    }
                }),
                h('Button', {
                    props: { icon: 'trash-a', type: 'error', size: 'small' }, style: { margin: '2px' }, on: {
                        click() {
                            removeEnclosure(params.index);
                        }
                    }
                }),
            ])
        }
    }
];